// 传入对象  传出对象
function deepClone (target) {
    const isObject = (tar) => {
        return (tar && (typeof tar === 'object' || typeof tar === 'function')) ? true : false
    }
    if(!isObject(target)) return target
    let res = target instanceof Array ? [] :{}
    for(let k in target){
        if(target.hasOwnProperty(k)){
            if(isObject(target[k])){
                res[k] = deepClone(target[k])
            }else{
                res[k] = target[k]
            }
        }
    }
    return res
}